package com.tianhai.db.parser.ast;

import java.util.List;

/**
 * INSERT INTO语句AST节点
 */
public class InsertStatement extends Statement {
    
    private final String tableName;
    private final List<String> columns;
    private final List<Object> values;
    
    public InsertStatement(String tableName, List<String> columns, List<Object> values) {
        this.tableName = tableName;
        this.columns = columns;
        this.values = values;
    }
    
    @Override
    public StatementType getType() {
        return StatementType.INSERT;
    }
    
    public String getTableName() {
        return tableName;
    }
    
    public List<String> getColumns() {
        return columns;
    }
    
    public List<Object> getValues() {
        return values;
    }
    
    @Override
    public String toString() {
        return "InsertStatement{" +
                "tableName='" + tableName + '\'' +
                ", columns=" + columns +
                ", values=" + values +
                '}';
    }
}
